cmake_minimum_required(VERSION 3.12.4)
project(rocks_db_query_testtool)

if(FSANITIZE)
set(CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=address,leak,undefined")
endif()

file(GLOB ROCKS_DB_QUERY_TESTTOOL_SRC
    "*.cpp"
    )

add_executable(${PROJECT_NAME}
    ${ROCKS_DB_QUERY_TESTTOOL_SRC}
    )
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -Wunused -Wcast-align -Wformat=2)

target_link_libraries(${PROJECT_NAME} pthread rocksdb flatbuffers rt)
